Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 3 - Image Compression Manager / Image Compression Manager Reference
Image Compression Manager Functions / Working With Images


GetImageDescriptionCTable

Your application may use the GetImageDescriptionCTable function to set the custom color table for an image.

pascal OSErr GetImageDescriptionCTable 
                              (ImageDescriptionHandle desc, 
                               CTabHandle *ctable);
desc
Contains a handle to the appropriate image description structure.
ctable
Contains a pointer to a field that is to receive a color table handle. The GetImageDescriptionCTable function returns the color table for the image described by the image description structure that is referred to by the desc parameter. The function correctly sizes the handle for the color table it returns.
DESCRIPTION
The Image Compression Manager stores the custom color table for an image in the appropriate image description structure. Your application must use QuickDraw's DisposeCTable routine to free the color table. (For details on DisposeCTable, see Inside Macintosh: Imaging.)

SPECIAL CONSIDERATIONS
If you want to find out if there is a custom color table, you should check the size of
the CTSize or CTSeed fields in the returned ctable parameter. If CTSize is 0 or if the CTSeed field is less than 0, then the color table is not a custom color table for that image.

RESULT CODES
noErr0No error
paramErr-50Invalid parameter specified
memFullErr-108Not enough memory available
noCodecErr-8961The Image Compression Manager could not find the specified compressor

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996